Skip to content

feat(Distributed): formalize notions of consistency for replicated data types and prove their relationships - #987

Merged
ctchou merged 27 commits into
leanprover:mainfrom
ctchou:replicated-consistency
Oct 17, 2026
Merged

ctchou merged 27 commits into
leanprover:mainfrom
ctchou:replicated-consistency

Conversation

@ctchou

@ctchou ctchou commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

This PR formalizes several notions of consistency for replicated data types and proves a hierarchy theorem for them:

Linearizability → SequentialConsistency → CausalConsistency → BasicEventualConsistency

The main reference is the book "Principles of eventual consistency" by Sebastian Burckhardt (which is freely downloadable; see the URL in the reference).

The proofs of causalVisibility_imp_readMyWrites and causalVisibility_imp_monotonicReads are constructed by Claude (Opus 5.5). But all definitions, theorem statements, and comments are human-written.

Used Claude (Opus 5.5) to fix proofs after the change of the definition AbstractExecution.hb.

@SamuelSchlesinger SamuelSchlesinger changed the title feat[Distributed]: formalize notions of consistency for replicated data types and prove their relationships feat(Distributed): formalize notions of consistency for replicated data types and prove their relationships Sep 29, 2026
@ctchou ctchou changed the title feat(Distributed): formalize notions of consistency for replicated data types and prove their relationships feat: formalize notions of consistency for replicated data types and prove their relationships Sep 29, 2026
@ctchou
ctchou force-pushed the replicated-consistency branch from 9e9e2e4 to a0084df Compare September 29, 2026 19:04
@ctchou ctchou changed the title feat: formalize notions of consistency for replicated data types and prove their relationships feat(Distributed): formalize notions of consistency for replicated data types and prove their relationships Sep 29, 2026
@ctchou
ctchou requested a review from crei as a code owner September 30, 2026 17:16
Comment thread Cslib/Computability/Distributed/Consistency/Specification.lean Outdated
Comment thread Cslib/Computability/Distributed/Consistency/Specification.lean
Comment thread Cslib/Foundations/Relation/Defs.lean
@ctchou

ctchou commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

@SamuelSchlesinger Any further comments? Thanks!

Comment thread Cslib/Computability/Distributed/Consistency/Specification.lean
@ctchou

ctchou commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@SamuelSchlesinger Any further comments? Thanks!

Comment thread Cslib/Foundations/Relation/Defs.lean Outdated
Comment thread Cslib/Foundations/Relation/Defs.lean Outdated

@SamuelSchlesinger SamuelSchlesinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this and iterate in future PRs if you'd like.

@ctchou
ctchou added this pull request to the merge queue Oct 17, 2026
@ctchou

ctchou commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks!

Merged via the queue into leanprover:main with commit 530b49b Oct 17, 2026
2 checks passed
@ctchou
ctchou deleted the replicated-consistency branch October 17, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants